<template>
  <div class="single" :class="plate == own ? 'selecetd' : ''">
    <span>
      <slot></slot>
    </span>
  </div>
</template>

<script>
export default {
  data() {
    return {

    };
    },
  props: {
    plate: {
        type: String,
        default: ''
      },
       own: {
        type: String,
        default: ''
    },
  },
};
</script>

<style lang="scss" scoped>
.single {
  margin-right:.5rem;
  position: relative;
  height: 5.4rem;
  width: 9%;
  font-size: .9rem;
cursor: pointer;
user-select: none;
  // 未选中的状态

  span {
    position: absolute;
    width: 100%;
    top: 22%;
    left: 42%;
    transform: translate(-50%, -50%);
    line-height: 2.2rem;
    font-size: 1rem;
    height: 50%;

    &::after {
      content: "";
      width: 100%;
      height: .4rem;
      position: absolute;
      bottom: 0;
      left: -0.6rem;
      background: linear-gradient(to right, transparent, #1a3e9b);
      transform: skew(-30deg);
      z-index: -1;
    }
    &::before {
      content: "";
      left: 0;
      top: 0;
      position: absolute;
      height: 100%;
      width: 100%;
      background: #0e1f73;
      transform: skew(-30deg);
     z-index: -1;
    }

  }
  //   选中的状态
  &.selecetd {
    span {
      &::before {
        background: #015c8b;
      }
      &::after {
        background: linear-gradient(to right, #00608e, #00aec2);
      }
    }
  }
}
</style>
